qrcode c#

65

qrcode c# -

privatevoid Form1_Load(object sender, EventArgs e){OleDbConnection aConnection = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:/Demo/BarcodeDemoData.mdb");aConnection.Open();OleDbDataAdapter dataAdapter = new OleDbDataAdapter("select * from Customer", aConnection);DataSet ds = new DataSet();dataAdapter.Fill(ds);//add a new column named "Barcode" to the DataSet, the new column data type is byte[]ds.Tables[0].Columns.Add(new DataColumn("Barcode", typeof(byte[])));Matrix Barcode = new Matrix();Barcode. MatrixBarcode = MatrixBarcode. QRCode;foreach (DataRow dr in ds.Tables[0].Rows){Barcode.BarcodeData = (int)dr["CustomerId"] + "";byte[] imageData = Barcode.drawBarcodeAsBytes();dr["Barcode"] = imageData;}CrystalReport1 rpt = new CrystalReport1();rpt.SetDataSource(ds);this.crystalReportViewer1.ReportSource = rpt;aConnection.Close();

Comments

Submit
0 Comments